package com.ld;

import com.intellij.openapi.components.BaseComponent;
import com.ld.translate.TranslateFactory;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public class Application implements BaseComponent {

    @Override
    public void disposeComponent() {
        TranslateFactory translateFactory = TranslateFactory.getInstance();
        PropertiesConfiguration properties = translateFactory.getProperties();
        if (properties != null){
            try {
                properties.save();
            } catch (ConfigurationException e) {
                e.printStackTrace();
            }
        }
    }
}
